<#-- 字段及对应描述Map -->
<#assign fieldDescriptionMap={}>
package ${package.Entity};

<#list table.importPackages as pkg>
import ${pkg};
</#list>
<#assign imports=cfg.tool.getEntityTemplateExtraImports(table)>
<#list imports as import>
import ${import};
</#list>
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

/**
*
* ${table.comment!}
*
* @tableName ${table.name}
* @author ${author}
*/
@Data
@TableName("${table.name}")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="${entity}对象", description="${table.comment!}")
public class ${entity} extends ${superEntityClass} {
<#-- ----------  BEGIN 字段循环遍历  ---------->
<#list table.fields as field>
    <#if field.comment!?length gt 0>
    /**
     * ${field.comment}
     */
    @ApiModelProperty(value = "${field.comment}")
    </#if>
    <#if field.customMap['EnumTypeName'] != 'null'>
    <#assign fieldDescriptionMap = fieldDescriptionMap + {field.propertyName:field.comment!}>
    private ${field.customMap['EnumTypeName']!} ${field.propertyName};
    <#elseif field.customMap['isEncrypt']>
    <#assign encryptTypeName=cfg.tool.getClassSimpleName(cfg.encryptFieldClass)>
    private ${encryptTypeName} ${field.propertyName};
    <#else>
    private ${field.propertyType} ${field.propertyName};
    </#if>

</#list>
<#------------  END 字段循环遍历  ---------->

<#-- START 枚举值循环遍历 -->
<#if cfg.entity??>
<#list cfg.entity.enums as enum>
    /**
     * ${fieldDescriptionMap[enum.fieldName]!} 枚举值
     */
    public enum ${enum.fieldName?cap_first}{
<#list enum.enumItems as enumItem>
        /**
         * ${enumItem.description!}
         */
        ${enumItem.name!}<#if enumItem_has_next>,</#if>
</#list>
    }
</#list>
<#-- START 枚举值循环遍历 -->

</#if>
}
